package bbalgae;

public class J30_OOP5 {
	

	public static void main(String[] args) {
		
		
		
	}

}

interface SungJukServices{
	
	int getTotal(SungJukVO sj);
	int getAverage(SungJukVO sj);
	int getGrade(SungJukVO sj);
		
	
}

class GimalSungJuk implements SungJukServices{

	@Override
	public int getTotal(SungJukVO sj) {
		
		return sj.kor+sj.eng+sj.mat;
	}

	@Override
	public int getAverage(SungJukVO sj) {
		
		return (sj.kor+sj.eng+sj.mat)/3;
	}

	@Override
	public int getGrade(SungJukVO sj) {
		
		switch(getTotal(sj)){
		
		case 10: System.out.println("수");
		case 9: 
		case 8: System.out.println("우");
		case 7: System.out.println("미");
		case 6: System.out.println("양");
		default:
			System.out.println("가");
		}
		return 0;
	}
	
	 
}